<template>
  <el-menu
    :default-active="defaultActive"
    class="el-menu-demo"
    mode="horizontal"
    router
  >
    <el-menu-item index="/">Create Project</el-menu-item>
    <el-menu-item index="/hello-world">Hello World</el-menu-item>
    <el-menu-item index="/test/how-are-you/6">Test</el-menu-item>
  </el-menu>
</template>
<script setup lang="ts">
import { computed, reactive } from "vue";
import { useRoute } from "vue-router";
import type ERemote from "@electron/remote";
try {
  const eRemote = require("@electron/remote") as typeof ERemote;
  console.log({
    "This is a electron browser window": eRemote.getCurrentWindow(),
  });
} catch (error) {
  console.log("This is not a electron window");
}
const $route = reactive(useRoute());
const defaultActive = computed(() => $route.path);
</script>
